#!/bin/sh -e

export LDFLAGS="$LDFLAGS -static"

./configure \
    --prefix=/usr \
    --enable-btyacc \
    --program-transform='s/^/b/'

make
make DESTDIR="$1" install

ln -s byacc "$1/usr/bin/yacc"
